package controller;


import java.util.List;
import business.BayesBusiness;
import entities.BayesResult;
import entities.Request;
import entities.TextValue;

public class BayesController {

	private static BayesController instance;

	public static BayesController getInstance(){
		if (instance == null)
			instance = new BayesController();
		return instance;
	}
	
	public BayesController(){ }

	public List<TextValue> getOcupacion()
	{
		return BayesBusiness.getInstance().getOcupaciones();
	}

	public List<TextValue> getRangoSaldo()
	{
		return BayesBusiness.getInstance().getRangoSaldo();
	}

	public List<TextValue> getRangoEdad()
	{
		return BayesBusiness.getInstance().getRangoEdad();
	}

	public List<TextValue> getEstadoCivil()
	{
		return BayesBusiness.getInstance().getEstadoCivil();
	}
	
	public List<TextValue> getNiveleducacion()
	{
		return BayesBusiness.getInstance().getNiveleducacion();
	}
	
	public List<TextValue> getTieneDeuda()
	{
		return BayesBusiness.getInstance().getTieneDeuda();
	}
	
	public List<TextValue> getTienePrestamoPersonales()
	{
		return BayesBusiness.getInstance().getTienePrestamoPersonales();
	}
	
	public List<TextValue> getTienePrestamoHipotecarios()
	{
		return BayesBusiness.getInstance().getTienePrestamoHipotecarios();
	}
	
	public List<TextValue> getTipoContacto()
	{
		return BayesBusiness.getInstance().getTipoContacto();
	}
		
	public BayesResult calcularBayes(Request request)
	{
		return BayesBusiness.getInstance().calcularBayes(request);
	}

	public void insertData(Request request)
	{
		BayesBusiness.getInstance().insertData(request);
	}


	public int findInList(String descripcion, List<TextValue> lista)
	{
		return BayesBusiness.getInstance().findInList(descripcion, lista);
	}
}
